<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets">
<h:head>
  <title>JeBlog</title>
  <title>Bootstrap, from Twitter</title>
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <meta name="description" content="A JavaEE Blogs" />
  <h:outputStylesheet library="css" name="bootstrap.min.css" />
  <h:outputStylesheet library="css" name="bootstrap-responsive.min.css" />
  <style type="text/css">
    body {
      padding-top: 70px;
      padding-bottom: 30px;
    }
  </style>
</h:head>
<h:body>
  <h:outputStylesheet library="css" name="jeblog.css" />

  <div class="container">
    <h3 class="muted">JeBlog</h3>
    <div class="navbar">
      <div class="navbar-inner">
        <div class="container">
          <ul class="nav">
            <li><h:link outcome="#{menu.homePage}" value="JeBlog" /></li>
            <li>
              <h:form id="log-form">
                <h:commandLink styleClass="menu-text" action="#{menu.getHomePage}" actionListener="#{user.logout}" rendered="#{user.logged}" value="Logout"/>
              </h:form>
            </li>
            <li><h:link outcome="#{links.loginPage}" value="Login" rendered="#{!user.logged}" /></li>
            <li><h:link outcome="#{links.createPost}" value="Create a post" rendered="#{user.logged}" /></li>
            <li><h:outputText styleClass="menu-text" value="Welcome #{user.name}." /></li>
          </ul>
        </div>
      </div>
    </div>

    <h:messages globalOnly="true" />

    <ui:insert name="content" />
    <hr />

    <div class="footer">
      <p>&copy; JeBlog - @rmannibucau</p>
    </div>
  </div>

  <h:outputScript library="js" name="jquery.min.js" />
  <h:outputScript library="js" name="bootstrap.min.js" />
</h:body>
</html>
